home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / doc / rileft.txt < prev    next >
Encoding:
Text File  |  2001-09-26  |  7.6 KB  |  199 lines

  1. *rileft.txt*    For Vim version 6.0.  Last change: 2001 Sep 17
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Avner Lottem
  5.  
  6.  
  7. Right to Left displaying and Hebrew Mapping for Vim        *hebrew*
  8.  
  9.  
  10. These functions have been made by Avner Lottem
  11. E-mail: <alottem@iil.intel.com>
  12. Phone:  +972-4-8307322
  13.  
  14. {Vi does not have any of these commands}
  15.  
  16.                             *E26*
  17. All this is only available when the |+rightleft| feature was enabled at
  18. compile time.
  19.  
  20.  
  21. Introduction
  22. ------------
  23. In right-to-left oriented files the characters appear on the screen from right
  24. to left.  This kind of file is most useful when writing Hebrew documents using
  25. TeX--XeT, troffh, composing faxes or writing Hebrew memos.
  26.  
  27. Logical order files, where direction is encoded for every character (or group
  28. of characters) are not supported as this kind of support is out of the scope
  29. of a simple addition to an existing editor.  Also, no Hebrew commands, prompts
  30. and help files were added, the standard Vi interface was maintained.  The
  31. intention here was to incorporate Hebrew support to an existing modern and
  32. live editor, hoping that the Hebrew support will continue to live in
  33. subsequent versions.  Many other Hebrew supported packages were designed for a
  34. particular version of the original (English) software and when it continued
  35. developing, the Hebrew version stayed behind.  Therefore this particular
  36. support to Vim tries to be as simple (and short) as possible, so that it could
  37. be incorporated into the official source.
  38.  
  39. Note that most of the other documentation files ignore rightleft mode and talk
  40. about movement and character positions as if there was no rightleft mode.
  41.  
  42.  
  43. Highlights
  44. ----------
  45. o  Editing left-to-right files as in the original Vim, no change.
  46.  
  47. o  Viewing and editing files in right-to-left windows.   File orientation
  48.    is per window, so it is possible to view the same file in right-to-left
  49.    and left-to-right modes, simultaneously.
  50.    (This is sometimes useful when editing documents with TeX--XeT.)
  51.  
  52. o  Compatibility to the original Vim.   Almost all features work in
  53.    right-to-left mode (see Bugs below).
  54.  
  55. o  Changing keyboard mapping and reverse insert modes using a single
  56.    command.
  57.  
  58. o  Backing from reverse insert mode to the correct place in the file
  59.    (if possible).
  60.  
  61. o  No special terminal with right-to-left capabilities is required.  The
  62.    right-to-left changes are completely hardware independent.  Only
  63.    Hebrew font is necessary.
  64.  
  65.    The MIT X distribution includes at least two fonts: heb6x13 and heb8x13.
  66.    Some fonts are on
  67.     http://sunsite.unc.edu/pub/Linux/X11/fonts/hebxfonts-0.2.tgz
  68.    More pointers are in the Hebrew HOWTO on
  69.     http://sunsite.unc.edu/pub/Linux/docs/HOWTO
  70.    To create a Hebrew font for a DOS box under MS-Windows, refer to a hack on
  71.    ftp://tochna.technion.ac.il/pub/staff/lottem/doswin-0.1.tgz.
  72.  
  73. o  It should be quite easy to adjust this support to handle other right-to
  74.    left languages, such as Arabic, by simply changing the keyboard mapping
  75.    according to the character encoding.
  76.  
  77.  
  78. Change details
  79. --------------
  80. +  Options:
  81.    +  'rightleft' ('rl') sets window orientation to right-to-left.
  82.    +  'hkmap' ('hk') sets keyboard mapping to Hebrew, in insert/replace modes.
  83.    +  'aleph' ('al'), numeric, holds the decimal code of Aleph, for keyboard
  84.       mapping.
  85.    +  'delcombine' ('deco'), boolean, if editing UTF-8 encoded Hebrew, allows
  86.       one to remove the niqud by pressing 'x' on a character (with associated
  87.       niqud).
  88.  
  89. +  Encoding:
  90.    +  Under Unix, ISO 8859-8 encoding (Hebrew letters codes: 224-250).
  91.    +  Under MS DOS, PC encoding (Hebrew letters codes: 128-154).
  92.    These are defaults, that can be overridden using the 'aleph' option.
  93.  
  94. +  Vim arguments:
  95.    +  'vim -H file' starts editing a Hebrew file, i.e. 'rightleft' and 'hkmap'
  96.       are set.
  97.  
  98. +  Keyboard:
  99.    +  The 'allowrevins' option enables the CTRL-_ command in Insert mode and
  100.       in Command-line mode.
  101.  
  102.    +  CTRL-_ in insert/replace modes toggles 'revins' and 'hkmap' as follows:
  103.  
  104.       When in rightleft window, 'revins' and 'nohkmap' are toggled, since
  105.       English will likely be inserted in this case.
  106.  
  107.       When in norightleft window, 'revins' 'hkmap' are toggled, since Hebrew
  108.       will likely be inserted in this case.
  109.  
  110.       CTRL-_ moves the cursor to the end of the typed text.
  111.  
  112.    +  CTRL-_ in command mode only toggles keyboard mapping (see Bugs below).
  113.       This setting is independent of 'hkmap' option, which only applies to
  114.       insert/replace mode.
  115.  
  116.       Note: On some keyboards, CTRL-_ is mapped to CTRL-?.
  117.  
  118.    +  Keyboard mapping while 'hkmap' is set:
  119.  
  120.     q w e r t y u i o p        The characters in the mapping shown
  121.     / ' ÷ ø à è å ï í ô        here are for ISO 8859-8.
  122.  
  123.      a s d f g h j k l ; '
  124.      ù ã â ë ò é ç ì ê ó ,
  125.  
  126.       z x c v b n m , . /
  127.       æ ñ á ä ð î ö ú õ .
  128.  
  129.  
  130. Bugs
  131. ----
  132. o  Does not handle CTRL-A and CTRL-X commands (add and subtract)
  133.    correctly when in rightleft window.
  134.  
  135. o  Does not support reverse insert and rightleft modes on the command-line.
  136.    However, functionality of the editor is not reduced, because it is
  137.    possible to enter mappings, abbreviations and searches with Hebrew text,
  138.    typed from the left to the right on the command-line.
  139.  
  140. o  Somewhat slower in right-to-left mode, because right-to-left motion is
  141.    emulated inside Vim, not by the controlling terminal.
  142.  
  143. o  Does not support 7 bit terminals.  Only a terminal with complete
  144.    Hebrew English font (without need to send escape sequences to switch
  145.    between Hebrew and English) is supported.
  146.  
  147. o  When the Athena GUI is used, the bottom scrollbar works in the wrong
  148.    direction.  This is difficult to fix.
  149.  
  150. o  When both 'rightleft' and 'revins' are on: 'textwidth' does not work.
  151.    Lines do not wrap at all; you just get a single, long line.
  152.  
  153.  
  154. Typing backwards                    *ins-reverse*
  155.  
  156. If the 'revins' (reverse insert) option is set, inserting happens backwards.
  157. This can be used to type Hebrew.  When inserting characters the cursor is not
  158. moved and the text moves rightwards.  A <BS> deletes the character under the
  159. cursor.  CTRL-W and CTRL-U also work in the opposite direction.  <BS>, CTRL-W
  160. and CTRL-U do not stop at the start of insert or end of line, no matter how
  161. the 'backspace' option is set.
  162.  
  163. There is no reverse replace mode (yet).
  164.  
  165. If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown in the
  166. status line when reverse Insert mode is active.
  167.  
  168. When the 'allowrevins' option is set, reverse Insert mode can be also entered
  169. via CTRL-_, which has some extra functionality: First, keyboard mapping is
  170. changed according to the window orientation -- if in a left-to-right window,
  171. 'revins' is used to enter Hebrew text, so the keyboard changes to Hebrew
  172. ('hkmap' is set); if in a right-to-left window, 'revins' is used to enter
  173. English text, so the keyboard changes to English ('hkmap' is reset).  Second,
  174. when exiting 'revins' via CTRL-_, the cursor moves to the end of the typed
  175. text (if possible).
  176.  
  177.  
  178. Pasting when in a rightleft window
  179. ----------------------------------
  180.  
  181. When cutting text with the mouse and pasting it in a rightleft window
  182. the text will be reversed, because the characters come from the cut buffer
  183. from the left to the right, while inserted in the file from the right to
  184. the left.   In order to avoid it, toggle 'revins' (by typing CTRL-? or CTRL-_)
  185. before pasting.
  186.  
  187.  
  188. Hebrew characters and the 'isprint' variable
  189. --------------------------------------------
  190.  
  191. Sometimes Hebrew character codes are in the none-printable range defined by
  192. the 'isprint' variable.  For example in the Linux console, the Hebrew font
  193. encoding starts from 128, while the default 'isprint' variable is @,161-255.
  194. The result is that all Hebrew characters are displayed as ~x.  To solve this
  195. problem, set isprint=@,128-255.
  196.  
  197.  
  198.  vim:tw=78:ts=8:ft=help:norl:
  199.